print(str("本计算器可进行以下运算\n"
          "加法：运算代码'+'\n"
          "减法：运算代码'-'\n"
          "乘法：运算代码'*'\n"
          "除法：运算代码'/'\n"
          "整除：运算代码'//'\n"
          "取余：运算代码'%'\n"
          "开方：运算代码'1/**'\n"))
a = int(input("请输入数值："))
b = input("请输入运算：")
c = int(input("请输入数值："))


def add(a, c):
    return a + c


def sub(a, c):
    return a - c


def mul(a, c):
    return a * c


def div(a, c):
    return a / c


def ediv(a, c):
    return a // c


def rem(a, c):
    return a % c


def nthr(a, c):
    return a ** (1 / c)


if b == '+':
    print("计算结果：", add(a, c));
elif b == '-':
    print("计算结果：", sub(a, c));
elif b == '*':
    print("计算结果：", mul(a, c));
elif b == '/':
    print("计算结果：", div(a, c));
elif b == '//':
    print("计算结果：", ediv(a, c));
elif b == '%':
    print("计算结果：", rem(a, c));
elif b == '1/**':
    print("计算结果：", nthr(a, c));
else:
    print(str("无法计算"))
